package com.translation.verb;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

import org.apache.commons.lang.StringEscapeUtils;

public class HtmlEntities {

	public static void main(String[] args) throws IOException {

		BufferedReader r = null;
		BufferedWriter w = null;
		try {
			r = new BufferedReader(new FileReader(args[0]));
			w = new BufferedWriter(new FileWriter(args[1]));
			String line = null;
			while ((line = r.readLine()) != null) {
				String txt = StringEscapeUtils.unescapeHtml(line);
				w.write(txt);
				w.write("\n");
			}
		} finally {
			if (r != null) {
				r.close();
			}
			if (w != null) {
				w.close();
			}
		}

	}
}
